
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type SystemLogRequest struct {

	AdminId string `json:"admin_id" form:"admin_id"`

	AdminName string `json:"admin_name" form:"admin_name"`

	Path string `json:"path" form:"path"`

	Page string `json:"page" form:"page"`

	Method string `json:"method" form:"method"`

	Ip string `json:"ip" form:"ip"`

	Type string `json:"type" form:"type"`

	AddTime string `json:"add_time" form:"add_time"`

	MerchantId string `json:"merchant_id" form:"merchant_id"`

}

func (r *SystemLogRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *SystemLogRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"admin_id": "required",

		"admin_name": "required",

		"path": "required",

		"page": "required",

		"method": "required",

		"ip": "required",

		"type": "required",

		"add_time": "required",

		"merchant_id": "required",

	}
}

func (r *SystemLogRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemLogRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemLogRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
